package com.smarthome.core.dictionary.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.smarthome.base.service.ShUsertLogTypeService;
import com.smarthome.core.dictionary.UsertLogTypeService;
import com.smarthome.domain.bean.ShUsertLogType;
import com.smarthome.domain.vo.boss.DataGrid;
import com.smarthome.domain.vo.boss.PageHelper;

/**
 * 
* @author zyf
* @date 2015年9月11日 下午8:26:14
* @version 1.0
* @Description: 系统用户日志类型业务处理实现类
 */
@Service("usertLogTypeService")
public class UsertLogTypeServiceImpl implements UsertLogTypeService {
	
	@Resource
	private ShUsertLogTypeService shUsertLogTypeService;
	
	@Override
	public DataGrid queryDatagrid(ShUsertLogType usertLogType, PageHelper page) {
		return shUsertLogTypeService.queryDatagrid(usertLogType, page);
	}

	@Override
	public List<ShUsertLogType> queryUsertLogType(ShUsertLogType usertLogType) {
		return shUsertLogTypeService.selectEntryList(usertLogType);
	}

	@Override
	public ShUsertLogType queryUsertLogTypeById(Long id) {
		return shUsertLogTypeService.selectEntryById(id);
	}

	@Override
	public void add(ShUsertLogType usertLogType) {
		shUsertLogTypeService.saveOrUpdate(usertLogType);
	}

	@Override
	public void edit(ShUsertLogType usertLogType) {
		shUsertLogTypeService.saveOrUpdate(usertLogType);
	}

	@Override
	public void delete(Long id) {
		ShUsertLogType usertLogType=shUsertLogTypeService.selectEntryById(id);
		usertLogType.setIsDel(1L);
		shUsertLogTypeService.saveOrUpdate(usertLogType);
	}

}
